const http=require("https")


function request(url){
  let p=new Promise((resolve,rej)=>{
    http.get(url,(req,res)=>{
      let arr=[]
      req.on('data',data=>{
        arr.push(data)
      })
      req.on('end',()=>{
        arr=arr.join("")
        resolve(arr)
      })
    })
  })
  return p
}
module.exports=request